﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Play : System.Web.UI.Page
{
    private readonly AMV.BLL.Music musicBll = new AMV.BLL.Music();


    public AMV.Model.Music Music { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {

        int musicId = 0;

        if (!int.TryParse(Request.QueryString["MusicID"], out musicId))
        {
            // 404
            Response.End();
            return;
        }


        AMV.Model.Music music = musicBll.GetModel(musicId);

        if (music == null)
        {
            // 404
            Response.End();
            return;
        }

        this.Music = music;
    }
}